<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户信息显示</title>
</head>
<script src="/js/jquery/2.0.0/jquery.min.js"></script>
<link href="/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="/js/bootstrap/3.3.6/bootstrap.min.js"></script>

<body>
<center>
    <style>
        div{
            margin:5px;
        }
    </style>
<form action="/HTML/userInfoUpdateTo" method="post">
    <div class="input-group col-md-3" th:each="user: ${user}">
        <span class="input-group-addon" id="basic-account">账号</span>
        <input type="text" class="form-control"  name="user.account" th:placeholder="${user.account}" disabled>
    </div>

    <div class="input-group  col-md-3" th:each="user: ${user}">
        <span class="input-group-addon" id="basic-name">姓名</span>
        <input type="text" class="form-control"   name="user.name" th:placeholder="${user.name}" >
    </div>

    <div class="input-group col-md-3" th:each="user: ${user}">
        <span class="input-group-addon" id="basic-gender">性别</span>
        <input type="text" class="form-control"   name="user.gender" th:placeholder="${user.gender}" >
    </div>

    <div class="input-group col-md-3" th:each="user: ${user}">
        <span class="input-group-addon" id="basic-age">年龄</span>
        <input type="text" class="form-control"  name="user.age" th:placeholder="${user.age}">
    </div>

    <div class="input-group col-md-3" th:each="user: ${user}">
        <span class="input-group-addon" id="basic-phone">电话号码</span>
        <input type="text" class="form-control"    name="user.phone" th:placeholder="${user.phone}" >
    </div>

    <div class="input-group col-md-3" th:each="user: ${user}">
        <span class="input-group-addon" id="basic-mail">邮箱地址</span>
        <input type="text" class="form-control"    name="user.mail" th:placeholder="${user.mail}" >
    </div>
    <input type="hidden" th:value="${flag}">
    <div2>
         如果您要修改具体信息，请在上面修改后，单击下面“确认修改”按钮
    </div2>
    <button type="submit"  class="btn btn-success" >确认修改</button>
</form>
    <div2>
        <form name =form1 method="post" action="/HTML/updatePassword">
            如果您要修改密码，请单击<a href="javascript:document.form1.submit();">
            "这里"
        </a>修改！
        </form>
    </div2>
    <form name="form2" action="/HTML/home">
    <button type="submit" class="btn btn-info">返回主页</button>
    </form>
    <p style="margin:0px">&nbsp;</p>
</center>
<script type="text/javascript">
    window.onload=function isupdate(){
        var data1=document.getElementById("flag");
        if(data1=="0")
        {
            alert("修改成功");
        }
        else if(data1=="1")
        {
            alert("修改失败");
        }
    }
</script>
</body>
</html>